import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'

Vue.use(VueRouter)

const routes = [
  {path:'/',redirect:'/home'},
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/shopcart',
    name: 'ShopCart',
    component: () => import( '../views/Cart/ShopCart.vue')
  },
  {
    path:'/login',
    component:()=>import('../views/Login/Login.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
